// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store/index'
import global from './utils/global'
import remconfig from './configs/rem.config'

remconfig()
// 用于处理日期选择器
Vue.config.productionTip = false

// 路由拦截
router.beforeEach((to, from, next) => {
  window.document.title = to.name
  return next()
})

// 路由初始化后
router.afterEach(route => {
})

Vue.prototype.$global = global

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
